import Mock from 'mockjs'
// 导入的假数据
import TeamList from './TeamList'
// 校验
import { MockParams } from './typing';
const mocks = [...TeamList]
//设置延时时间
Mock.setup({
  timeout: '300-500'
})
// 导出注册好的假数据(在main.ts中引入就行)
export function mockXHR() {
  let i: MockParams;
  for (i of mocks) {
    Mock.mock(new RegExp(i.url), i.type.toLowerCase() || 'get', i.response)
  }
}
